﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Volo.Abp.Domain.Entities;

namespace HCMS.Entities.Manage
{
    /// <summary>
    /// 管理系统 角色
    /// </summary>
    [Table("role")]
    public class Role : Entity<int>
    {
        /// <summary>
        /// Id
        /// </summary>
        public new int Id { get; set; }

        /// <summary>
        /// 创建 时间
        /// </summary>
        [Column("create_time")]
        public DateTime CreateTime { get; set; } = DateTime.Now;

        /// <summary>
        /// 创建 人
        /// </summary>
        [Column("create_user")]
        public string CreateUser { get; set; } = "";

        /// <summary>
        /// 更新 时间
        /// </summary>
        [Column("update_time")]
        public DateTime UpdateTime { get; set; } = DateTime.Now;

        /// <summary>
        /// 更新 人
        /// </summary>
        [Column("update_user")]
        public string UpdateUser { get; set; } = "";

        /// <summary>
        /// 状态
        /// </summary>
        [Column("status")]
        public int Status { get; set; }

        /// <summary>
        /// 角色 名称
        /// </summary>
        [Required(ErrorMessage = "请填写 名称")]
        [Column("name")]
        public string Name { get; set; } = "";

        /// <summary>
        /// 父级 Id
        /// </summary>
        [Column("parent_id")]
        public int ParentId { get; set; }

        /// <summary>
        /// 父级 路径
        /// </summary>
        [Column("parent_path")]
        public string ParentPath { get; set; } = "";
    }
}
